home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Utilities / Miscellaneous / CopyPaste 3.3.4 / CopyPaste Tools Sourcecode / CopyPaste Tools Programming FAQ < prev    next >
Encoding:
Text File  |  1997-06-06  |  4.8 KB  |  119 lines  |  [TEXT/ttxt]

  1. CopyPaste Tools Programming Frequently Asked Questions
  2.  
  3. Make sure to read the Tools documentation too.
  4.  
  5. Question:
  6. What do these examples do.
  7. Answer:
  8. The sources are not commented, but fairly easy to understand as they only
  9. do three things: They take a clip from the deskscrap, convert it and put
  10. it back to the deskscrap again.
  11.  
  12. Question: 
  13. Are these Copypaste Tools exactly the same as fkey code from the past?
  14. Answer: 
  15. Yes, but the temporary memory allocation requires system 6.07 or later
  16.  
  17.  
  18. Question: 
  19. Will the Copypaste Tool/fkey i create be used automatically by Copypaste?
  20. Answer: 
  21. No, you have to include it into CopyPaste via ResEdit and then you have 
  22. to insert the menutitle into the STR# resource. The following rules have 
  23. to be followed. The resource IDs starting with 1000 are for German 
  24. language, starting with 2000 are Englisch, starting with 3000 are 
  25. Japanese, starting with 4000 are French. The menutitles for the external 
  26. utilities are to be found for the Englisch resources in 2102 for text 
  27. tools, 2103 for picture tools, 2104 for time tools and 2105 for other 
  28. tools. The format of the strings have to be the resource type followed by 
  29. 4 digits for the resource ID followed by the title to be displayed. Thus 
  30. if you would like to link a text tool FKey "My new Tool" with ID 128 you have to insert 
  31. "FKEY0128My new Tool". CopyPaste would display My new Tool in the menus and 
  32. if you select this item, CopyPaste would look for a FKey with ID 128 and 
  33. call it subsequently.
  34. Note: Please do not upload or pass around altered versions of CopyPaste
  35. but please let us know about CopyPaste fkey/utilities that you make.
  36.  
  37. Question:
  38. How many Tools can be added to Copypaste?
  39. Answer:
  40. Limited only by the resourcemanager, which allows around 3000 resources 
  41. in a file. Maybe the MenuManager has another limitation for its menu items.
  42.  
  43. Question:
  44. If i create a great Copypaste Tool how can i distribute it?
  45. Answer:
  46. Discuss and send it to Julian Miller, julian@sierra.net
  47.  
  48. Question:
  49. Are there any limitations on memory or other resources that a Copypaste Tool
  50. writer should know about?
  51. Answer:
  52. CopyPaste launches the FKey into the current heap, therefore you should 
  53. either use temporay memory or look for a heap which has space enough to 
  54. keep the desired amount of memory. CopyPaste itself locks the memory used 
  55. for the Handle to the FKey resource and disposes of it after return.
  56.  
  57. Question:
  58. Can we add Tools to Copypaste that don't operate on data in the clipboard
  59. but show the memory an application is using etc.?
  60. Answer:
  61. Yes, CopyPaste does no automatic paste of the clipboard content, so it is 
  62. the tools responsibility to send a paste event or to let the user decide.
  63.  
  64. Question:
  65. Which clipboard does a utility work on?
  66. Answer:
  67. It works on the current deskscrap and sets the CopyPaste clipboard counter 
  68. to zero which is the default clipboard.
  69.  
  70. Question:
  71. Is it possible to work on other clipboards like #7 or #8? 
  72. Answer:
  73. Only in the CopyPaste Clipboard Viewer you can work with your utility 
  74. on any of the other clipboards.
  75.  
  76. Question:
  77. Why are the resources in font files?
  78. Answers:
  79. All FKey are build into a font suitcase although, they are
  80. not at all a font. The reason is the easy installation (just
  81. drop it on top of the System Folder of System 7.1 or greater.
  82. You don’t even need to reboot) The System will happily keep
  83. all resource forks from all font suitcases open. This means
  84. the system will use any FKey in a font file as if it were
  85. installed directley into the system file. Nevertheless you
  86. have to use ResEdit to renumber the FKey to a range of 0 ..
  87. 9. This does not mean they will be used by CopyPaste but they
  88. can be used as an Fkey.
  89.  
  90. Question:
  91. Why do i get these errors in Code Warrior?
  92. > Warning : routine ‘UnloadA4Seg’ declared but undefined.
  93. > PascalA4.p line 29
  94. > Warning : routine ‘SetA4’ declared but undefined.
  95. > PascalA4.p line 29
  96. > Warning : routine ‘GetCurrentA4’ declared but undefined.
  97. > PascalA4.p line 29
  98. > Warning : routine ‘RestoreA4’ declared but undefined.
  99. > PascalA4.p line 29
  100. > Warning : routine ‘SetUpA4’ declared but undefined.
  101. > PascalA4.p line 29
  102. > Warning : routine ‘RememberA4’ declared but undefined.
  103. > PascalA4.p line 29
  104. Answer:
  105. There is a missing instruction in the original Metrowerks unit pascalA4. 
  106. If you modify it and add the keyword "external;" after every instruction, 
  107. then it will compile without warnings.
  108.  
  109. Other Remarks:
  110. Some of the routines may appear a little more complicated than necessary. 
  111. This is because they are designed to overcome three limitations, i.e. 
  112. 1: the amount of text is not limited to the 32k barrier which many procedures have,
  113. 2: the memory is allocated as temporary memory which is not limited to 
  114. the current heap of the running application.
  115. 3: the converters are aware of two byte character code, which means they 
  116. are Worldscrip compatible. If you can live with those limitations (of 
  117. course you can not) the code could be more compact.
  118.  
  119.